<template>
  <div class="pop-box">
    <p class="news-title">{{ newItem.title }}</p>
    <div class="news-fu-title">
      <span>作者：{{ newItem.author }}</span>
      <span>发布时间：{{ newItem.addtime }}</span>
    </div>
    <van-divider></van-divider>

    <div v-dompurify-html="newItem.contents" class="news-contents"></div>

    <du-down-load :fj="newItem.fj"></du-down-load>
  </div>
</template>

<script setup>
const props = defineProps({
  newItem: {
    type: Object,
    default: () => {
      return {
        title: '', // 新闻标题
        author: '', // 作者
        addtime: '', // 发布时间
        contents: '', // 新闻文本内容
        fj: [], // 附件数组
      }
    },
  },
})
</script>

<style scoped lang="scss">
.pop-box {
  overflow-y: auto;
  overflow-x: hidden;
}
.news-title {
  font-size: 38px;
  text-align: center;
  line-height: 50px;
  margin-top: 10px;
  margin-bottom: 30px;
  word-wrap: break-word;
  word-break: normal;
  font-weight: bold;
  color: var(--app-text-color);
}
.news-fu-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  color: var(--app-text-color2);
  font-size: 28px;
  span {
    padding: 10px 20px;
  }
}
.news-contents {
  padding: 20px;
  color: #666;
  word-wrap: break-word;
  word-break: normal;
  ::v-deep(img) {
    width: 100% !important;
    height: auto !important;
  }
}
.van-divider {
  margin: 0.1rem;
}
</style>
